Integrand size = 25, antiderivative size = 177 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\frac {\left (a^2 (2 A+C)+b^2 (A+2 C)\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{5/2} (a+b)^{5/2} d}-\frac {\left (A b^2+a^2 C\right ) \sin (c+d x)}{2 b \left (a^2-b^2\right ) d (a+b \cos (c+d x))^2}-\frac {a \left (3 A b^2-a^2 C+4 b^2 C\right ) \sin (c+d x)}{2 b \left (a^2-b^2\right )^2 d (a+b \cos (c+d x))} \]
(a^2*(2*A+C)+b^2*(A+2*C))*arctan((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/(a+b)^(1/2 ))/(a-b)^(5/2)/(a+b)^(5/2)/d-1/2*(A*b^2+C*a^2)*sin(d*x+c)/b/(a^2-b^2)/d/(a +b*cos(d*x+c))^2-1/2*a*(3*A*b^2-C*a^2+4*C*b^2)*sin(d*x+c)/b/(a^2-b^2)^2/d/ (a+b*cos(d*x+c))
Time = 1.13 (sec) , antiderivative size = 170, normalized size of antiderivative = 0.96 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\frac {-\frac {2 \left (a^2 (2 A+C)+b^2 (A+2 C)\right ) \text {arctanh}\left (\frac {(a-b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {-a^2+b^2}}\right )}{\left (-a^2+b^2\right )^{5/2}}+\frac {\left (A b^2+a^2 C\right ) \sin (c+d x)}{b (-a+b) (a+b) (a+b \cos (c+d x))^2}+\frac {a \left (-3 A b^2+\left (a^2-4 b^2\right ) C\right ) \sin (c+d x)}{(a-b)^2 b (a+b)^2 (a+b \cos (c+d x))}}{2 d} \]
((-2*(a^2*(2*A + C) + b^2*(A + 2*C))*ArcTanh[((a - b)*Tan[(c + d*x)/2])/Sq rt[-a^2 + b^2]])/(-a^2 + b^2)^(5/2) + ((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(- a + b)*(a + b)*(a + b*Cos[c + d*x])^2) + (a*(-3*A*b^2 + (a^2 - 4*b^2)*C)*S in[c + d*x])/((a - b)^2*b*(a + b)^2*(a + b*Cos[c + d*x])))/(2*d)
Time = 0.63 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.15, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3501, 25, 3042, 3233, 25, 27, 3042, 3138, 218}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+C \sin \left (c+d x+\frac {\pi }{2}\right )^2}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx\) |
\(\Big \downarrow \) 3501 |
\(\displaystyle -\frac {\int -\frac {2 a b (A+C)-\left (-C a^2+A b^2+2 b^2 C\right ) \cos (c+d x)}{(a+b \cos (c+d x))^2}dx}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {2 a b (A+C)-\left (A b^2-\left (a^2-2 b^2\right ) C\right ) \cos (c+d x)}{(a+b \cos (c+d x))^2}dx}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {2 a b (A+C)+\left (\left (a^2-2 b^2\right ) C-A b^2\right ) \sin \left (c+d x+\frac {\pi }{2}\right )}{\left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 3233 |
\(\displaystyle \frac {-\frac {\int -\frac {b \left ((2 A+C) a^2+b^2 (A+2 C)\right )}{a+b \cos (c+d x)}dx}{a^2-b^2}-\frac {a \left (3 A b^2-C \left (a^2-4 b^2\right )\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {\int \frac {b \left ((2 A+C) a^2+b^2 (A+2 C)\right )}{a+b \cos (c+d x)}dx}{a^2-b^2}-\frac {a \left (3 A b^2-C \left (a^2-4 b^2\right )\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {b \left (a^2 (2 A+C)+b^2 (A+2 C)\right ) \int \frac {1}{a+b \cos (c+d x)}dx}{a^2-b^2}-\frac {a \left (3 A b^2-C \left (a^2-4 b^2\right )\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {b \left (a^2 (2 A+C)+b^2 (A+2 C)\right ) \int \frac {1}{a+b \sin \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {a \left (3 A b^2-C \left (a^2-4 b^2\right )\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {2 b \left (a^2 (2 A+C)+b^2 (A+2 C)\right ) \int \frac {1}{(a-b) \tan ^2\left (\frac {1}{2} (c+d x)\right )+a+b}d\tan \left (\frac {1}{2} (c+d x)\right )}{d \left (a^2-b^2\right )}-\frac {a \left (3 A b^2-C \left (a^2-4 b^2\right )\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {\frac {2 b \left (a^2 (2 A+C)+b^2 (A+2 C)\right ) \arctan \left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )}-\frac {a \left (3 A b^2-C \left (a^2-4 b^2\right )\right ) \sin (c+d x)}{d \left (a^2-b^2\right ) (a+b \cos (c+d x))}}{2 b \left (a^2-b^2\right )}-\frac {\left (a^2 C+A b^2\right ) \sin (c+d x)}{2 b d \left (a^2-b^2\right ) (a+b \cos (c+d x))^2}\) |
-1/2*((A*b^2 + a^2*C)*Sin[c + d*x])/(b*(a^2 - b^2)*d*(a + b*Cos[c + d*x])^ 2) + ((2*b*(a^2*(2*A + C) + b^2*(A + 2*C))*ArcTan[(Sqrt[a - b]*Tan[(c + d* x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a^2 - b^2)*d) - (a*(3*A*b^2 - (a^2 - 4*b^2)*C)*Sin[c + d*x])/((a^2 - b^2)*d*(a + b*Cos[c + d*x])))/(2 *b*(a^2 - b^2))
3.6.81.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*Cos[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1/((m + 1)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*( m + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 + a^2*C))*Cos[e + f*x]*((a + b*S in[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 - b^2))), x] + Simp[1/(b*(m + 1)*(a^ 2 - b^2)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*b*(A + C)*(m + 1) - (A* b^2 + a^2*C + b^2*(A + C)*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C}, x] && LtQ[m, -1] && NeQ[a^2 - b^2, 0]
Time = 2.17 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.28
method | result | size |
derivativedivides | \(\frac {\frac {-\frac {\left (4 A a b +A \,b^{2}+a^{2} C +4 C a b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}-\frac {\left (4 A a b -A \,b^{2}-a^{2} C +4 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a +b \right ) \left (a^{2}-2 a b +b^{2}\right )}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{2}}+\frac {\left (2 A \,a^{2}+A \,b^{2}+a^{2} C +2 b^{2} C \right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{d}\) | \(226\) |
default | \(\frac {\frac {-\frac {\left (4 A a b +A \,b^{2}+a^{2} C +4 C a b \right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{\left (a -b \right ) \left (a^{2}+2 a b +b^{2}\right )}-\frac {\left (4 A a b -A \,b^{2}-a^{2} C +4 C a b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a +b \right ) \left (a^{2}-2 a b +b^{2}\right )}}{{\left (\left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right ) a -b \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+a +b \right )}^{2}}+\frac {\left (2 A \,a^{2}+A \,b^{2}+a^{2} C +2 b^{2} C \right ) \arctan \left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a -b \right ) \left (a +b \right )}}\right )}{\left (a^{4}-2 a^{2} b^{2}+b^{4}\right ) \sqrt {\left (a -b \right ) \left (a +b \right )}}}{d}\) | \(226\) |
risch | \(\frac {i \left (-2 A \,a^{2} b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-A \,b^{5} {\mathrm e}^{3 i \left (d x +c \right )}+2 C \,a^{4} b \,{\mathrm e}^{3 i \left (d x +c \right )}-5 C \,a^{2} b^{3} {\mathrm e}^{3 i \left (d x +c \right )}-6 A \,a^{3} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}-3 A a \,b^{4} {\mathrm e}^{2 i \left (d x +c \right )}+2 C \,a^{5} {\mathrm e}^{2 i \left (d x +c \right )}-7 \,{\mathrm e}^{2 i \left (d x +c \right )} C \,a^{3} b^{2}-4 C a \,b^{4} {\mathrm e}^{2 i \left (d x +c \right )}-10 \,{\mathrm e}^{i \left (d x +c \right )} A \,a^{2} b^{3}+{\mathrm e}^{i \left (d x +c \right )} A \,b^{5}+2 \,{\mathrm e}^{i \left (d x +c \right )} C \,a^{4} b -11 \,{\mathrm e}^{i \left (d x +c \right )} C \,a^{2} b^{3}-3 A a \,b^{4}+C \,a^{3} b^{2}-4 C a \,b^{4}\right )}{b^{2} \left (a^{2}-b^{2}\right )^{2} d \left (b \,{\mathrm e}^{2 i \left (d x +c \right )}+2 a \,{\mathrm e}^{i \left (d x +c \right )}+b \right )^{2}}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) A \,a^{2}}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}-\frac {b^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) A}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) C \,a^{2}}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {i a^{2}-i b^{2}+a \sqrt {-a^{2}+b^{2}}}{b \sqrt {-a^{2}+b^{2}}}\right ) b^{2} C}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) A \,a^{2}}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) A \,b^{2}}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) a^{2} C}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+\frac {-i a^{2}+i b^{2}+a \sqrt {-a^{2}+b^{2}}}{\sqrt {-a^{2}+b^{2}}\, b}\right ) b^{2} C}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right )^{2} \left (a -b \right )^{2} d}\) | \(958\) |
1/d*(2*(-1/2*(4*A*a*b+A*b^2+C*a^2+4*C*a*b)/(a-b)/(a^2+2*a*b+b^2)*tan(1/2*d *x+1/2*c)^3-1/2*(4*A*a*b-A*b^2-C*a^2+4*C*a*b)/(a+b)/(a^2-2*a*b+b^2)*tan(1/ 2*d*x+1/2*c))/(tan(1/2*d*x+1/2*c)^2*a-b*tan(1/2*d*x+1/2*c)^2+a+b)^2+(2*A*a ^2+A*b^2+C*a^2+2*C*b^2)/(a^4-2*a^2*b^2+b^4)/((a-b)*(a+b))^(1/2)*arctan((a- b)*tan(1/2*d*x+1/2*c)/((a-b)*(a+b))^(1/2)))
Time = 0.30 (sec) , antiderivative size = 709, normalized size of antiderivative = 4.01 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\left [-\frac {{\left ({\left (2 \, A + C\right )} a^{4} + {\left (A + 2 \, C\right )} a^{2} b^{2} + {\left ({\left (2 \, A + C\right )} a^{2} b^{2} + {\left (A + 2 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left ({\left (2 \, A + C\right )} a^{3} b + {\left (A + 2 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {2 \, a b \cos \left (d x + c\right ) + {\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + 2 \, \sqrt {-a^{2} + b^{2}} {\left (a \cos \left (d x + c\right ) + b\right )} \sin \left (d x + c\right ) - a^{2} + 2 \, b^{2}}{b^{2} \cos \left (d x + c\right )^{2} + 2 \, a b \cos \left (d x + c\right ) + a^{2}}\right ) + 2 \, {\left ({\left (4 \, A + 3 \, C\right )} a^{4} b - {\left (5 \, A + 3 \, C\right )} a^{2} b^{3} + A b^{5} - {\left (C a^{5} - {\left (3 \, A + 5 \, C\right )} a^{3} b^{2} + {\left (3 \, A + 4 \, C\right )} a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{4 \, {\left ({\left (a^{6} b^{2} - 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} - b^{8}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{7} b - 3 \, a^{5} b^{3} + 3 \, a^{3} b^{5} - a b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{8} - 3 \, a^{6} b^{2} + 3 \, a^{4} b^{4} - a^{2} b^{6}\right )} d\right )}}, \frac {{\left ({\left (2 \, A + C\right )} a^{4} + {\left (A + 2 \, C\right )} a^{2} b^{2} + {\left ({\left (2 \, A + C\right )} a^{2} b^{2} + {\left (A + 2 \, C\right )} b^{4}\right )} \cos \left (d x + c\right )^{2} + 2 \, {\left ({\left (2 \, A + C\right )} a^{3} b + {\left (A + 2 \, C\right )} a b^{3}\right )} \cos \left (d x + c\right )\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \cos \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \sin \left (d x + c\right )}\right ) - {\left ({\left (4 \, A + 3 \, C\right )} a^{4} b - {\left (5 \, A + 3 \, C\right )} a^{2} b^{3} + A b^{5} - {\left (C a^{5} - {\left (3 \, A + 5 \, C\right )} a^{3} b^{2} + {\left (3 \, A + 4 \, C\right )} a b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{2 \, {\left ({\left (a^{6} b^{2} - 3 \, a^{4} b^{4} + 3 \, a^{2} b^{6} - b^{8}\right )} d \cos \left (d x + c\right )^{2} + 2 \, {\left (a^{7} b - 3 \, a^{5} b^{3} + 3 \, a^{3} b^{5} - a b^{7}\right )} d \cos \left (d x + c\right ) + {\left (a^{8} - 3 \, a^{6} b^{2} + 3 \, a^{4} b^{4} - a^{2} b^{6}\right )} d\right )}}\right ] \]
[-1/4*(((2*A + C)*a^4 + (A + 2*C)*a^2*b^2 + ((2*A + C)*a^2*b^2 + (A + 2*C) *b^4)*cos(d*x + c)^2 + 2*((2*A + C)*a^3*b + (A + 2*C)*a*b^3)*cos(d*x + c)) *sqrt(-a^2 + b^2)*log((2*a*b*cos(d*x + c) + (2*a^2 - b^2)*cos(d*x + c)^2 + 2*sqrt(-a^2 + b^2)*(a*cos(d*x + c) + b)*sin(d*x + c) - a^2 + 2*b^2)/(b^2* cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + a^2)) + 2*((4*A + 3*C)*a^4*b - (5*A + 3*C)*a^2*b^3 + A*b^5 - (C*a^5 - (3*A + 5*C)*a^3*b^2 + (3*A + 4*C)*a*b^4) *cos(d*x + c))*sin(d*x + c))/((a^6*b^2 - 3*a^4*b^4 + 3*a^2*b^6 - b^8)*d*co s(d*x + c)^2 + 2*(a^7*b - 3*a^5*b^3 + 3*a^3*b^5 - a*b^7)*d*cos(d*x + c) + (a^8 - 3*a^6*b^2 + 3*a^4*b^4 - a^2*b^6)*d), 1/2*(((2*A + C)*a^4 + (A + 2*C )*a^2*b^2 + ((2*A + C)*a^2*b^2 + (A + 2*C)*b^4)*cos(d*x + c)^2 + 2*((2*A + C)*a^3*b + (A + 2*C)*a*b^3)*cos(d*x + c))*sqrt(a^2 - b^2)*arctan(-(a*cos( d*x + c) + b)/(sqrt(a^2 - b^2)*sin(d*x + c))) - ((4*A + 3*C)*a^4*b - (5*A + 3*C)*a^2*b^3 + A*b^5 - (C*a^5 - (3*A + 5*C)*a^3*b^2 + (3*A + 4*C)*a*b^4) *cos(d*x + c))*sin(d*x + c))/((a^6*b^2 - 3*a^4*b^4 + 3*a^2*b^6 - b^8)*d*co s(d*x + c)^2 + 2*(a^7*b - 3*a^5*b^3 + 3*a^3*b^5 - a*b^7)*d*cos(d*x + c) + (a^8 - 3*a^6*b^2 + 3*a^4*b^4 - a^2*b^6)*d)]
Timed out. \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*b^2-4*a^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 369 vs. \(2 (163) = 326\).
Time = 0.33 (sec) , antiderivative size = 369, normalized size of antiderivative = 2.08 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\frac {\frac {{\left (2 \, A a^{2} + C a^{2} + A b^{2} + 2 \, C b^{2}\right )} {\left (\pi \left \lfloor \frac {d x + c}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} \sqrt {a^{2} - b^{2}}} - \frac {C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 4 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 3 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 3 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 4 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - C a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, A a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, C a^{2} b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 3 \, A a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 4 \, C a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - A b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{{\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} {\left (a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - b \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a + b\right )}^{2}}}{d} \]
((2*A*a^2 + C*a^2 + A*b^2 + 2*C*b^2)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn (2*a - 2*b) + arctan((a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqr t(a^2 - b^2)))/((a^4 - 2*a^2*b^2 + b^4)*sqrt(a^2 - b^2)) - (C*a^3*tan(1/2* d*x + 1/2*c)^3 + 4*A*a^2*b*tan(1/2*d*x + 1/2*c)^3 + 3*C*a^2*b*tan(1/2*d*x + 1/2*c)^3 - 3*A*a*b^2*tan(1/2*d*x + 1/2*c)^3 - 4*C*a*b^2*tan(1/2*d*x + 1/ 2*c)^3 - A*b^3*tan(1/2*d*x + 1/2*c)^3 - C*a^3*tan(1/2*d*x + 1/2*c) + 4*A*a ^2*b*tan(1/2*d*x + 1/2*c) + 3*C*a^2*b*tan(1/2*d*x + 1/2*c) + 3*A*a*b^2*tan (1/2*d*x + 1/2*c) + 4*C*a*b^2*tan(1/2*d*x + 1/2*c) - A*b^3*tan(1/2*d*x + 1 /2*c))/((a^4 - 2*a^2*b^2 + b^4)*(a*tan(1/2*d*x + 1/2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 + a + b)^2))/d
Time = 5.18 (sec) , antiderivative size = 241, normalized size of antiderivative = 1.36 \[ \int \frac {A+C \cos ^2(c+d x)}{(a+b \cos (c+d x))^3} \, dx=\frac {\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A\,b^2+C\,a^2-4\,A\,a\,b-4\,C\,a\,b\right )}{\left (a+b\right )\,\left (a^2-2\,a\,b+b^2\right )}-\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (A\,b^2+C\,a^2+4\,A\,a\,b+4\,C\,a\,b\right )}{{\left (a+b\right )}^2\,\left (a-b\right )}}{d\,\left (2\,a\,b+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (2\,a^2-2\,b^2\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (a^2-2\,a\,b+b^2\right )+a^2+b^2\right )}+\frac {\mathrm {atan}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a-2\,b\right )\,\left (a^2-2\,a\,b+b^2\right )}{2\,\sqrt {a+b}\,{\left (a-b\right )}^{5/2}}\right )\,\left (2\,A\,a^2+A\,b^2+C\,a^2+2\,C\,b^2\right )}{d\,{\left (a+b\right )}^{5/2}\,{\left (a-b\right )}^{5/2}} \]
((tan(c/2 + (d*x)/2)*(A*b^2 + C*a^2 - 4*A*a*b - 4*C*a*b))/((a + b)*(a^2 - 2*a*b + b^2)) - (tan(c/2 + (d*x)/2)^3*(A*b^2 + C*a^2 + 4*A*a*b + 4*C*a*b)) /((a + b)^2*(a - b)))/(d*(2*a*b + tan(c/2 + (d*x)/2)^2*(2*a^2 - 2*b^2) + t an(c/2 + (d*x)/2)^4*(a^2 - 2*a*b + b^2) + a^2 + b^2)) + (atan((tan(c/2 + ( d*x)/2)*(2*a - 2*b)*(a^2 - 2*a*b + b^2))/(2*(a + b)^(1/2)*(a - b)^(5/2)))* (2*A*a^2 + A*b^2 + C*a^2 + 2*C*b^2))/(d*(a + b)^(5/2)*(a - b)^(5/2))